package com.feifei.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 *      配置类
 * */
@Configuration
public class ConfigBean
{
    @Bean
    @LoadBalanced     // 配置负载均衡实现RestTemplate  一个注册就完事
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
